import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/basic_information/scheduling_plan_entity.dart';

SchedulingPlanEntity $SchedulingPlanEntityFromJson(Map<String, dynamic> json) {
  final SchedulingPlanEntity schedulingPlanEntity = SchedulingPlanEntity();
  final int? appClockStatus = jsonConvert.convert<int>(json['appClockStatus']);
  if (appClockStatus != null) {
    schedulingPlanEntity.appClockStatus = appClockStatus;
  }
  final String? askForLeave = jsonConvert.convert<String>(json['askForLeave']);
  if (askForLeave != null) {
    schedulingPlanEntity.askForLeave = askForLeave;
  }
  final String? classesBeginDate = jsonConvert.convert<String>(json['classesBeginDate']);
  if (classesBeginDate != null) {
    schedulingPlanEntity.classesBeginDate = classesBeginDate;
  }
  final String? classesBeginDateRecord = jsonConvert.convert<String>(json['classesBeginDateRecord']);
  if (classesBeginDateRecord != null) {
    schedulingPlanEntity.classesBeginDateRecord = classesBeginDateRecord;
  }
  final String? classesColor = jsonConvert.convert<String>(json['classesColor']);
  if (classesColor != null) {
    schedulingPlanEntity.classesColor = classesColor;
  }
  final String? classesEndDate = jsonConvert.convert<String>(json['classesEndDate']);
  if (classesEndDate != null) {
    schedulingPlanEntity.classesEndDate = classesEndDate;
  }
  final String? classesEndDateRecord = jsonConvert.convert<String>(json['classesEndDateRecord']);
  if (classesEndDateRecord != null) {
    schedulingPlanEntity.classesEndDateRecord = classesEndDateRecord;
  }
  final String? onDutyLeader = jsonConvert.convert<String>(json['onDutyLeader']);
  if (onDutyLeader != null) {
    schedulingPlanEntity.onDutyLeader = onDutyLeader;
  }
  final String? classesId = jsonConvert.convert<String>(json['classesId']);
  if (classesId != null) {
    schedulingPlanEntity.classesId = classesId;
  }
  final String? classesIdName = jsonConvert.convert<String>(json['classesIdName']);
  if (classesIdName != null) {
    schedulingPlanEntity.classesIdName = classesIdName;
  }
  final String? classesName = jsonConvert.convert<String>(json['classesName']);
  if (classesName != null) {
    schedulingPlanEntity.classesName = classesName;
  }
  final String? clockInRemark = jsonConvert.convert<String>(json['clockInRemark']);
  if (clockInRemark != null) {
    schedulingPlanEntity.clockInRemark = clockInRemark;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    schedulingPlanEntity.companyCode = companyCode;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    schedulingPlanEntity.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    schedulingPlanEntity.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    schedulingPlanEntity.createDate = createDate;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    schedulingPlanEntity.deleted = deleted;
  }
  final String? departmentId = jsonConvert.convert<String>(json['departmentId']);
  if (departmentId != null) {
    schedulingPlanEntity.departmentId = departmentId;
  }
  final int? dutyResults = jsonConvert.convert<int>(json['dutyResults']);
  if (dutyResults != null) {
    schedulingPlanEntity.dutyResults = dutyResults;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    schedulingPlanEntity.id = id;
  }
  final String? onDutyDate = jsonConvert.convert<String>(json['onDutyDate']);
  if (onDutyDate != null) {
    schedulingPlanEntity.onDutyDate = onDutyDate;
  }
  final String? onDutyDateStr = jsonConvert.convert<String>(json['onDutyDateStr']);
  if (onDutyDateStr != null) {
    schedulingPlanEntity.onDutyDateStr = onDutyDateStr;
  }
  final String? onDutyLeaderTel = jsonConvert.convert<String>(json['onDutyLeaderTel']);
  if (onDutyLeaderTel != null) {
    schedulingPlanEntity.onDutyLeaderTel = onDutyLeaderTel;
  }
  final String? onDutyStatus = jsonConvert.convert<String>(json['onDutyStatus']);
  if (onDutyStatus != null) {
    schedulingPlanEntity.onDutyStatus = onDutyStatus;
  }
  final String? onDutyStatusName = jsonConvert.convert<String>(json['onDutyStatusName']);
  if (onDutyStatusName != null) {
    schedulingPlanEntity.onDutyStatusName = onDutyStatusName;
  }
  final String? dutyResultsName = jsonConvert.convert<String>(json['dutyResultsName']);
  if (dutyResultsName != null) {
    schedulingPlanEntity.dutyResultsName = dutyResultsName;
  }
  final String? personType = jsonConvert.convert<String>(json['personType']);
  if (personType != null) {
    schedulingPlanEntity.personType = personType;
  }
  final String? personTypeName = jsonConvert.convert<String>(json['personTypeName']);
  if (personTypeName != null) {
    schedulingPlanEntity.personTypeName = personTypeName;
  }
  final String? onDutyType = jsonConvert.convert<String>(json['onDutyType']);
  if (onDutyType != null) {
    schedulingPlanEntity.onDutyType = onDutyType;
  }
  final String? onDutyUserPhone = jsonConvert.convert<String>(json['onDutyUserPhone']);
  if (onDutyUserPhone != null) {
    schedulingPlanEntity.onDutyUserPhone = onDutyUserPhone;
  }
  final String? schedulingConfigId = jsonConvert.convert<String>(json['schedulingConfigId']);
  if (schedulingConfigId != null) {
    schedulingPlanEntity.schedulingConfigId = schedulingConfigId;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    schedulingPlanEntity.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    schedulingPlanEntity.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    schedulingPlanEntity.updateDate = updateDate;
  }
  final String? userId = jsonConvert.convert<String>(json['userId']);
  if (userId != null) {
    schedulingPlanEntity.userId = userId;
  }
  final String? userName = jsonConvert.convert<String>(json['userName']);
  if (userName != null) {
    schedulingPlanEntity.userName = userName;
  }
  return schedulingPlanEntity;
}

Map<String, dynamic> $SchedulingPlanEntityToJson(SchedulingPlanEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['appClockStatus'] = entity.appClockStatus;
  data['askForLeave'] = entity.askForLeave;
  data['classesBeginDate'] = entity.classesBeginDate;
  data['classesBeginDateRecord'] = entity.classesBeginDateRecord;
  data['classesColor'] = entity.classesColor;
  data['classesEndDate'] = entity.classesEndDate;
  data['classesEndDateRecord'] = entity.classesEndDateRecord;
  data['onDutyLeader'] = entity.onDutyLeader;
  data['classesId'] = entity.classesId;
  data['classesIdName'] = entity.classesIdName;
  data['classesName'] = entity.classesName;
  data['clockInRemark'] = entity.clockInRemark;
  data['companyCode'] = entity.companyCode;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['deleted'] = entity.deleted;
  data['departmentId'] = entity.departmentId;
  data['dutyResults'] = entity.dutyResults;
  data['id'] = entity.id;
  data['onDutyDate'] = entity.onDutyDate;
  data['onDutyDateStr'] = entity.onDutyDateStr;
  data['onDutyLeaderTel'] = entity.onDutyLeaderTel;
  data['onDutyStatus'] = entity.onDutyStatus;
  data['onDutyStatusName'] = entity.onDutyStatusName;
  data['dutyResultsName'] = entity.dutyResultsName;
  data['personType'] = entity.personType;
  data['personTypeName'] = entity.personTypeName;
  data['onDutyType'] = entity.onDutyType;
  data['onDutyUserPhone'] = entity.onDutyUserPhone;
  data['schedulingConfigId'] = entity.schedulingConfigId;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  data['userId'] = entity.userId;
  data['userName'] = entity.userName;
  return data;
}

extension SchedulingPlanEntityExtension on SchedulingPlanEntity {
  SchedulingPlanEntity copyWith({
    int? appClockStatus,
    String? askForLeave,
    String? classesBeginDate,
    String? classesBeginDateRecord,
    String? classesColor,
    String? classesEndDate,
    String? classesEndDateRecord,
    String? onDutyLeader,
    String? classesId,
    String? classesIdName,
    String? classesName,
    String? clockInRemark,
    String? companyCode,
    String? createBy,
    String? createById,
    String? createDate,
    String? deleted,
    String? departmentId,
    int? dutyResults,
    String? id,
    String? onDutyDate,
    String? onDutyDateStr,
    String? onDutyLeaderTel,
    String? onDutyStatus,
    String? onDutyStatusName,
    String? dutyResultsName,
    String? personType,
    String? personTypeName,
    String? onDutyType,
    String? onDutyUserPhone,
    String? schedulingConfigId,
    String? updateBy,
    String? updateById,
    String? updateDate,
    String? userId,
    String? userName,
  }) {
    return SchedulingPlanEntity()
      ..appClockStatus = appClockStatus ?? this.appClockStatus
      ..askForLeave = askForLeave ?? this.askForLeave
      ..classesBeginDate = classesBeginDate ?? this.classesBeginDate
      ..classesBeginDateRecord = classesBeginDateRecord ?? this.classesBeginDateRecord
      ..classesColor = classesColor ?? this.classesColor
      ..classesEndDate = classesEndDate ?? this.classesEndDate
      ..classesEndDateRecord = classesEndDateRecord ?? this.classesEndDateRecord
      ..onDutyLeader = onDutyLeader ?? this.onDutyLeader
      ..classesId = classesId ?? this.classesId
      ..classesIdName = classesIdName ?? this.classesIdName
      ..classesName = classesName ?? this.classesName
      ..clockInRemark = clockInRemark ?? this.clockInRemark
      ..companyCode = companyCode ?? this.companyCode
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..deleted = deleted ?? this.deleted
      ..departmentId = departmentId ?? this.departmentId
      ..dutyResults = dutyResults ?? this.dutyResults
      ..id = id ?? this.id
      ..onDutyDate = onDutyDate ?? this.onDutyDate
      ..onDutyDateStr = onDutyDateStr ?? this.onDutyDateStr
      ..onDutyLeaderTel = onDutyLeaderTel ?? this.onDutyLeaderTel
      ..onDutyStatus = onDutyStatus ?? this.onDutyStatus
      ..onDutyStatusName = onDutyStatusName ?? this.onDutyStatusName
      ..dutyResultsName = dutyResultsName ?? this.dutyResultsName
      ..personType = personType ?? this.personType
      ..personTypeName = personTypeName ?? this.personTypeName
      ..onDutyType = onDutyType ?? this.onDutyType
      ..onDutyUserPhone = onDutyUserPhone ?? this.onDutyUserPhone
      ..schedulingConfigId = schedulingConfigId ?? this.schedulingConfigId
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate
      ..userId = userId ?? this.userId
      ..userName = userName ?? this.userName;
  }
}
